package at.fhooe.mc.android.shiftalarmclock;

import android.util.Log;

public class AlarmModel{
	String shiftde = "Frei";
	String shiften = "free";
	public static boolean AlarmOnOff = false;
	public static boolean[] days;
	public static long[] AlarmTimes;

	public long getTime(DummyDataMain a) {
		String t = a.getAlarmTime();
		int h = (t.charAt(0) - 48) * 10;
		h = h + t.charAt(1) - 48;
		int min = (t.charAt(3) - 48) * 10;
		try {
			min = min + t.charAt(4) - 48;
		} catch (StringIndexOutOfBoundsException e) {
			Log.i("AlarmClock", "StringIndexOutOfBoundsException catched");
		}
		long timeMill = (h * 3600000) + (min * 60000);
		return timeMill;
	}

	

}
